package com.sinodata.bsm.center.bean;

import com.sinodata.bsm.center.cache.PropertyCache;
import com.sinodata.bsm.center.util.spring.SpringContextHolder;
import com.sinodata.bsm.common.vo.Property;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-6-29 PM 10:43:57    liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class PropertyBean {

    /**
     * 指标POJO缓存
     */
    private static PropertyCache propertyCache = SpringContextHolder.getBean(PropertyCache.class);

    private Property property;

    private PropertyBean() {

    }

    private PropertyBean(Property property) {
        this.property = property;
    }

    public static PropertyBean get(Long id) {
        return new PropertyBean(propertyCache.get(id));
    }

    public Property property() {
        return property;
    }

}
